package com.a2v2.online.store.database.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
/**
 * 
 * @author 
 * Base class for all domain model.
 * contain common shared attributes (fields/columns)
 * like id, created by modified by etc.
 *
 */
@MappedSuperclass
public class BaseEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3750762560402861920L;

	@Id
    @GeneratedValue
    protected Long id;

    @Column(name = "version")
    protected Integer version;       
	@Column(name = "created_by")
    protected String createdBy;
    @Column(name = "modified_by")
    protected String modifiedBy;
    @Column(name = "created_ts")
    protected Timestamp createdOn;
    @Column(name = "modified_ts")
    protected Timestamp modifiedOn;
    
    
    public Integer getVersion() {
		return version;
	}
	public void setVersion(Integer pVersion) {
		this.version = pVersion;
	}
    public String getCreatedBy() {
        return createdBy;
    }
    public void setCreatedBy(String pCreatedBy) {
        this.createdBy = pCreatedBy;
    }
    public String getModifiedBy() {
        return modifiedBy;
    }
    public void setModifiedBy(String pModifiedBy) {
        this.modifiedBy = pModifiedBy;
    }
    public Timestamp getCreatedOn() {
        return createdOn;
    }
    public void setCreatedOn(Timestamp pCreatedOn) {
        this.createdOn = pCreatedOn;
    }
    public Timestamp getModifiedOn() {
        return modifiedOn;
    }
    public void setModifiedOn(Timestamp pModifiedOn) {
        this.modifiedOn = pModifiedOn;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
}
